
<!--
 * @Author: cgl
 * @Date: 2023-04-18 15:12:26
 * @LastEditors: cgl
 * @LastEditTime: 2023-07-17 14:05:35
 * @FilePath: \public-health-emergencies-fed:\radiation-hygiene-fe\src\views\slide\components\testItem\testItem11.vue
 * @Description: 08-检测项目
 *
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved.
-->
<template>
  <div>

    <div class="content">
      <!-- 1.影像接收器响应:---------------------------------------------------------------------------------- -->
      <div id="table1">
        <div class="innertitle" style="margin-top: 0">
          1.影像接收器响应:
          （ <el-checkbox
            style="margin-right: 0"
            v-model="form1.notObtain"
          >无法获取预处理影像</el-checkbox>）
        </div>
        <div class="tip-30">
          预置条件：
					<el-input v-model="form1.tubeVoltage" class="input-line"/>kV /
					焦点：<el-radio-group v-model="form1.focus" class="split-radio">
            <el-radio :label="2">大焦点</el-radio>
            <el-radio :label="1">小焦点</el-radio>
            <el-radio style="margin-right: 0px;" :label="0">无大小焦点</el-radio>
          </el-radio-group>;
          <span style="margin-left: 0px;">靶/滤过：</span>
          <el-select v-model="form1.target" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select> /
          <el-select v-model="form1.filtration" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>;
          拟合类型：
          <el-radio-group v-model="form1.computeType" class="split-radio">
            <el-radio :label="0">线性拟合</el-radio>
            <el-radio :label="1">对数拟合</el-radio>
            <el-radio style="margin-right: 0px;" :label="2">指数拟合</el-radio>
          </el-radio-group>;
          校准因子:
					<el-input class="input-line result" v-model="form1.calibrationFactorValue" disabled></el-input>;
          <span style="margin-left: 0px;">模体厚度:4cm</span>
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td width="120px">预置条件,mAs</td>
            <td>
              <el-input v-model="form1.milliampereSecond_1" />
            </td>
            <td>
              <el-input v-model="form1.milliampereSecond_2" />
            </td>
            <td>
              <el-input v-model="form1.milliampereSecond_3" />
            </td>
            <td>
              <el-input v-model="form1.milliampereSecond_4" />
            </td>
            <td>
              <el-input v-model="form1.milliampereSecond_5" />
            </td>
            <td>
              <el-input v-model="form1.milliampereSecond_6" />
            </td>
            <td>拟合方程<i>$R ^2 $</i>值</td>
          </tr>
          <tr>
            <td>入射剂量,mGy</td>
            <td>
              <el-input v-model="form1.measurementValue_1" />
            </td>
            <td>
              <el-input v-model="form1.measurementValue_2" />
            </td>
            <td>
              <el-input v-model="form1.measurementValue_3" />
            </td>
            <td>
              <el-input v-model="form1.measurementValue_4" />
            </td>
            <td>
              <el-input v-model="form1.measurementValue_5" />
            </td>
            <td>
              <el-input v-model="form1.measurementValue_6" />
            </td>
            <td rowspan="3" class="result" width="200px">
              <!-- 线性 -->
              <span v-if="form1.computeType == 0 && form1.linearA && form1.linearB">
                {{ `y = ${form1.linearA} x + ${form1.linearB}` }}
              </span>
              <!-- 对数 -->
              <span v-if="form1.computeType == 1 && form1.linearA && form1.linearB">
                {{ `y = ${form1.linearB} ln(x) + ${form1.linearA}` }}
              </span>
              <!-- 指数 -->
              <span v-if="form1.computeType == 2 && form1.linearA && form1.linearB">
                <!-- <i>$y = {{ form1.linearA }}e^{ {{ form1.linearB }}x }$</i> -->
                <i>y = {{ form1.linearA }}e<sup>{{ form1.linearB }}x</sup></i>
              </span>
              <br />
              <span style="display: inline-block; margin-top: 10px;">
                <i>$R^2$</i> = {{ form1.fittingRelevantParameters }}
              </span>
            </td>
          </tr>
          <tr>
            <td>修正值,mGy</td>
            <td class="result">
              <el-input v-model="form1.calibrationValue_1" disabled />
            </td>
            <td class="result">
              <el-input v-model="form1.calibrationValue_2" disabled />
            </td>
            <td class="result">
              <el-input v-model="form1.calibrationValue_3" disabled />
            </td>
            <td class="result">
              <el-input v-model="form1.calibrationValue_4" disabled />
            </td>
            <td class="result">
              <el-input v-model="form1.calibrationValue_5" disabled />
            </td>
            <td class="result">
              <el-input v-model="form1.calibrationValue_6" disabled />
            </td>
          </tr>
          <tr>
            <td>平均像素值</td>
            <td>
              <el-input v-model="form1.averageValue_1" />
            </td>
            <td>
              <el-input v-model="form1.averageValue_2" />
            </td>
            <td>
              <el-input v-model="form1.averageValue_3" />
            </td>
            <td>
              <el-input v-model="form1.averageValue_4" />
            </td>
            <td>
              <el-input v-model="form1.averageValue_5" />
            </td>
            <td>
              <el-input v-model="form1.averageValue_6" />
            </td>
          </tr>
        </table>
      </div>

			<!-- 2.影像接收器均匀性、3.伪影:---------------------------------------------------------------------------------- -->
      <div id="table2" style="margin-top: 15px;">
        <div class="innertitle" style="position: relative;">
          2.影像接收器均匀性、3.伪影:
          （ <el-checkbox
            style="margin-right: 0"
            v-model="form2.notObtain"
          >无法获取预处理影像</el-checkbox>）
					<span style="position: absolute; right: 0px; top: 0px;"><i>$D_e = {m_{中心} - m_角 \over m_{中心}} \times 100\%$</i></span>
        </div>
        <div class="tip-30" style="margin-top: 5px;">
          预置条件：
					（<el-radio v-model="form2.exposureType" :label="1">手动</el-radio>
					<el-radio v-model="form2.exposureType" :label="2">自动</el-radio>）：
					<el-input v-model="form2.tubeVoltage" class="input-line"/>kV /
					<el-input v-model="form2.tubeCurrent" class="input-line"/>mAs /
          焦点：<el-radio-group v-model="form2.focus" class="split-radio">
            <el-radio :label="2">大焦点</el-radio>
            <el-radio :label="1">小焦点</el-radio>
            <el-radio :label="0">无大小焦点</el-radio>
          </el-radio-group>
          <span style="margin-left: 50px;">靶/滤过：</span>
          <el-select v-model="form2.target" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select> /
          <el-select v-model="form2.filtration" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
          <span style="margin-left: 50px;">模体厚度:4cm</span>
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center">
					<tr>
            <td rowspan="2" width="180px">测量位置</td>
            <td><i>$m_{中心}$</i></td>
            <td colspan="4"><i>$m_{角}$</i></td>
            <td rowspan="2">均匀性（%）</td>
            <td rowspan="2">影响临床影像的伪影</td>
          </tr>
					<tr>
            <td>中心</td>
            <td>左上</td>
            <td>右上</td>
            <td>左下</td>
            <td>右下</td>
          </tr>
          <tr>
            <td>实测平均像素值（PV）</td>
            <td>
              <el-input v-model="form2.pixelValue_1" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_2" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_3" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_4" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_5" />
            </td>
            <td rowspan="3" class="result">
              {{ form2.uniformity }}
            </td>
            <td rowspan="3">
							<el-radio v-model="form2.haveArtifact" :label="true">有</el-radio><br />
							<el-radio v-model="form2.haveArtifact" :label="false">无</el-radio>
						</td>
          </tr>
          <tr>
            <td>线性换算剂量m（mGy）</td>
            <td class="result">
              {{ form2.doseValue_1 }}
            </td>
            <td class="result">
              {{ form2.doseValue_2 }}
            </td>
            <td class="result">
              {{ form2.doseValue_3 }}
            </td>
            <td class="result">
              {{ form2.doseValue_4 }}
            </td>
            <td class="result">
              {{ form2.doseValue_5 }}
            </td>
          </tr>
          <tr>
            <td colspan="2">与中心剂量偏差,%</td>
            <td class="result">
              {{ form2.deviation_1 }}
            </td>
            <td class="result">
              {{ form2.deviation_2 }}
            </td>
            <td class="result">
              {{ form2.deviation_3 }}
            </td>
            <td class="result">
              {{ form2.deviation_4 }}
            </td>
          </tr>
        </table>
      </div>

			<!-- 3.高对比度分辨力------------------------------------------------------------------------ -->
      <div id="table3">
        <div class="innertitle">
          4.高对比度分辨力:
        </div>

        <div class="tip-30">
          预置条件：<el-input v-model="form3.tubeVoltage" class="input-line" />kV，<el-input v-model="form3.tubeCurrent" class="input-line" />mAs，
          靶/滤过：
          <el-select v-model="form3.target" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select> /
          <el-select v-model="form3.filtration" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
          <span style="margin-left: 50px;">模体厚度:4cm</span>
          <el-checkbox style="margin-left: 50px;" v-model="form3.baseLineDefinition" :disabled="!form3.baseLineControls">建立基线值</el-checkbox>
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td>分辨力卡方向</td>
            <td>最大可分辨的线对数目，lp/mm</td>
            <td>厂家规定值lp/mm</td>
            <td>偏差%</td>
            <td><i>$f_{Nyquist}lp/mm$</i></td>
						<td>偏差%</td>
            <td>基线值lp/mm</td>
						<td>偏差%</td>
          </tr>

          <tr>
            <td>水平</td>
            <td>
              <el-input v-model="form3.contrastResolutionHighLevel" />
            </td>
            <td>
              <el-input v-model="form3.manufacturerGuaranteeValueLevel" />
            </td>
            <td class="result">
              <el-input v-model="form3.deviationLevel_1" disabled/>
            </td>
            <td>
              <el-input v-model="form3.f_value_level" />
            </td>
            <td class="result">
              <el-input v-model="form3.deviationLevel_2" disabled/>
            </td>
            <td :class="{result: !form3.baseLineControls}" @click="handleClickBaselineValue(form3.baselineValueLevel)">
              <span class="text-underline" v-show="!form3.baseLineControls">{{ form3.baselineValueLevel }}</span>
              <el-input v-model="form3.baselineValueLevel" v-show="form3.baseLineControls"/>
            </td>
            <td class="result">
              <el-input v-model="form3.deviationLevel_3" disabled/>
            </td>
          </tr>
          <tr>
            <td>垂直</td>
            <td>
              <el-input v-model="form3.contrastResolutionHighVertical" />
            </td>
            <td>
              <el-input v-model="form3.manufacturerGuaranteeValueVertical" />
            </td>
            <td class="result">
              <el-input v-model="form3.deviationVertical_1" disabled/>
            </td>
            <td>
              <el-input v-model="form3.f_value_vertical" />
            </td>
            <td class="result">
              <el-input v-model="form3.deviationVertical_2" disabled/>
            </td>
            <td :class="{result: !form3.baseLineControls}" @click="handleClickBaselineValue(form3.baselineValueVertical)">
              <span class="text-underline" v-show="!form3.baseLineControls">{{ form3.baselineValueVertical }}</span>
              <el-input v-model="form3.baselineValueVertical" v-show="form3.baseLineControls"/>
            </td>
            <td class="result">
              <el-input v-model="form3.deviationVertical_3" disabled/>
            </td>
          </tr>
        </table>
      </div>

			<!-- 4.低对比度细节------------------------------------------------------------------ -->
      <div id="table4">
        <div class="innertitle">
          5.低对比度细节:
        </div>

        <div class="tip-30">
          预置条件
					（<el-radio-group v-model="form4.presetConditions" class="split-radio">
            <el-radio :label="1" style="margin-right: 10px">手动</el-radio>
            <el-radio :label="2">自动</el-radio>
          </el-radio-group>）：
          <el-input v-model="form4.tubeVoltage" class="input-line" />kV /
          <el-input v-model="form4.tubeCurrent" class="input-line" />mAs /
          焦点:<el-radio-group v-model="form4.focus" class="split-radio">
            <el-radio :label="2">大焦点</el-radio>
            <el-radio :label="1">小焦点</el-radio>
            <el-radio :label="0">无大小焦点</el-radio>
          </el-radio-group>，
          靶/滤过：
          <el-select v-model="form4.target" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select> /
          <el-select v-model="form4.filtration" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>

          <span style="margin-left: 50px;">模体厚度:4cm</span>
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
          <tr>
            <td style="width: 250px;">细节直径D,mm</td>
            <td>
              <el-input v-model="form4.diameter_1" data-cusValidate="text" />
            </td>
            <td>
              <el-input v-model="form4.diameter_2" data-cusValidate="text" />
            </td>
            <td>
              <el-input v-model="form4.diameter_3" data-cusValidate="text" />
            </td>
            <td>
              <el-input v-model="form4.diameter_4" data-cusValidate="text" />
            </td>
            <td>
              <el-input v-model="form4.diameter_5" data-cusValidate="text" />
            </td>
          </tr>
          <tr>
            <td>细节个数</td>
            <td>
              <el-input v-model="form4.number_1" />
            </td>
            <td>
              <el-input v-model="form4.number_2" />
            </td>
            <td>
              <el-input v-model="form4.number_3" />
            </td>
            <td>
              <el-input v-model="form4.number_4" />
            </td>
            <td>
              <el-input v-model="form4.number_5" />
            </td>
          </tr>
          <tr>
            <td>
              <span style="color: #2A72EE; cursor: pointer; text-decoration: underline; z-index: 999; position: relative;">
                <span @click="showDetailThicknessCardDialog = true">细节厚度,μm</span>
              </span>
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_1 && form4.number_1 && !form4.thickness_1">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.thickness_1" disabled v-show="form4.thickness_1" /> -->
              <el-input v-model="form4.thickness_1" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_2 && form4.number_2 && !form4.thickness_2">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.thickness_2" disabled v-show="form4.thickness_2" /> -->
              <el-input v-model="form4.thickness_2" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_3 && form4.number_3 && !form4.thickness_3">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.thickness_3" disabled v-show="form4.thickness_3" /> -->
              <el-input v-model="form4.thickness_3" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_4 && form4.number_4 && !form4.thickness_4">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.thickness_4" disabled v-show="form4.thickness_4" /> -->
              <el-input v-model="form4.thickness_4" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_5 && form4.number_5 && !form4.thickness_5">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.thickness_5" disabled v-show="form4.thickness_5" /> -->
              <el-input v-model="form4.thickness_5" />
            </td>
          </tr>
          <tr>
            <td>
              <span style="color: #2A72EE; cursor: pointer; text-decoration: underline; z-index: 999; position: relative;">
                <span @click="showCrContrastCardDialog = true">Cr,%</span>
              </span>
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_1 && form4.number_1 && !form4.contrast_1">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.contrast_1" disabled v-show="form4.contrast_1" /> -->
              <el-input v-model="form4.contrast_1" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_2 && form4.number_2 && !form4.contrast_2">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.contrast_2" disabled v-show="form4.contrast_2" /> -->
              <el-input v-model="form4.contrast_2" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_3 && form4.number_3 && !form4.contrast_3">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.contrast_3" disabled v-show="form4.contrast_3" /> -->
              <el-input v-model="form4.contrast_3" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_4 && form4.number_4 && !form4.contrast_4">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.contrast_4" disabled v-show="form4.contrast_4" /> -->
              <el-input v-model="form4.contrast_4" />
            </td>
            <td class="result">
              <!-- <div v-show="form4.diameter_5 && form4.number_5 && !form4.contrast_5">
                <span style="color: red;">未匹配</span>
              </div>
              <el-input v-model="form4.contrast_5" disabled v-show="form4.contrast_5" /> -->
              <el-input v-model="form4.contrast_5" />
            </td>
          </tr>
        </table>
        <!-- <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
          <tr>
            <td style="width: 150px;">细节厚度，μm</td>
            <td>
              0.03
            </td>
            <td>
              0.04
            </td>
            <td>
              0.05
            </td>
            <td>
              0.06
            </td>
            <td>
              0.07
            </td>
            <td>
              0.09
            </td>
            <td>
              0.12
            </td>
            <td>
              0.15
            </td>
          </tr>
          <tr>
            <td>Cr，%</td>
            <td>
              0.52
            </td>
            <td>
              0.70
            </td>
            <td>
              0.87
            </td>
            <td>
              1.04
            </td>
            <td>
              1.22
            </td>
            <td>
              1.56
            </td>
            <td>
              2.08
            </td>
            <td>
              2.59
            </td>
          </tr>
        </table> -->
        <!-- <table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 100%;">
          <tr>
            <td style="width: 150px;">细节厚度，μm</td>
            <td>
              0.20
            </td>
            <td>
              0.25
            </td>
            <td>
              0.35
            </td>
            <td>
              0.50
            </td>
            <td>
              0.70
            </td>
            <td>
              1.00
            </td>
            <td>
              1.70
            </td>
            <td>
              2.00
            </td>
          </tr>
          <tr>
            <td>Cr，%</td>
            <td>
              3.44
            </td>
            <td>
              4.28
            </td>
            <td>
              5.94
            </td>
            <td>
              8.38
            </td>
            <td>
              11.53
            </td>
            <td>
              16.05
            </td>
            <td>
              25.73
            </td>
            <td>
              29.53
            </td>
          </tr>
				</table> -->
      </div>

      <div id="table9">
        <div class="innertitle">
          其他说明：
        </div>
        <div class="tip-30">
          <el-input
            type="textarea"
            placeholder=""
            v-model="basicForm.specialCircumstances"
            :autosize="{minRows:2}"
            @blur="$bus.$emit('update-basicinfo', basicForm.taskDetectionEquipmentResultId)"
          ></el-input>
        </div>
      </div>

      <!-- 3.高对比度分辨力 -->
			<el-dialog
				:title="`高对比度分辨力 （创建时间：${form3Detail.baseLineDefinitionDate}）`"
				:visible.sync="dialogVisibleBaselineValue"
				width="1240px"
				:destroy-on-close="true"
				v-dialogDrag="true"
				append-to-body
			>
				<!-- 3.高对比度分辨力------------------------------------------------------------------ -->
				<div style="padding: 0 20px; width: 100%;">
          <div class="tip-30">
            预置条件：<el-input v-model="form3Detail.tubeVoltage" class="input-line" disabled/>kV，<el-input v-model="form3Detail.tubeCurrent" class="input-line" disabled/>mAs，
            靶/滤过：
            <el-select v-model="form3Detail.target" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable disabled>
              <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select> /
            <el-select v-model="form3Detail.filtration" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable disabled>
              <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
            <span style="margin-left: 50px;">模体厚度:4cm</span>
            <el-checkbox style="margin-left: 50px;" v-model="form3Detail.baseLineDefinition" disabled>建立基线值</el-checkbox>
          </div>
					<table border="1" cellspacing="0" cellpadding="0" align="center">
            <tr>
              <td>分辨力卡方向</td>
              <td>最大可分辨的线对数目，lp/mm</td>
              <td>厂家规定值lp/mm</td>
              <td>偏差%</td>
              <td><i>$f_{Nyquist}lp/mm$</i></td>
              <td>偏差%</td>
              <td>基线值lp/mm</td>
              <td>偏差%</td>
            </tr>

            <tr>
              <td>水平</td>
              <td>
                <el-input v-model="form3Detail.contrastResolutionHighLevel" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.manufacturerGuaranteeValueLevel" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.deviationLevel_1" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.f_value_level" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.deviationLevel_2" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.baselineValueLevel" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.deviationLevel_3" disabled/>
              </td>
            </tr>
            <tr>
              <td>垂直</td>
              <td>
                <el-input v-model="form3Detail.contrastResolutionHighVertical" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.manufacturerGuaranteeValueVertical" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.deviationVertical_1" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.f_value_vertical" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.deviationVertical_2" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.baselineValueVertical" disabled/>
              </td>
              <td>
                <el-input v-model="form3Detail.deviationVertical_3" disabled/>
              </td>
            </tr>
          </table>
				</div>
				<div slot="footer">
					<el-button @click="dialogVisibleBaselineValue = false">关 闭</el-button>
				</div>
			</el-dialog>

      <!-- 1.影像接收器响应：---------------------------------------------------------------------------------- -->
      <!-- <div id="table1">
				<div class="innertitle" style="margin-top: 0">
					1.影像接收器响应：
				</div>
				（ <el-checkbox @change="changeNotHave($event, 1)" v-model="form1.notHave">设备不具备预处理影像程序</el-checkbox>）

				<div class="tip-30">
					预设条件28kV，焦点状态：
					<el-radio-group v-model="form1.focusType">
						<el-radio :label="1">大焦点</el-radio>
						<el-radio :label="2">小焦点</el-radio>
					</el-radio-group>，滤线栅：
					<el-radio-group v-model="form1.filterGrid">
						<el-radio :label="true">有</el-radio>
						<el-radio :label="false">无</el-radio>
					</el-radio-group>，压迫器：
					<el-radio-group v-model="form1.compressor">
						<el-radio :label="true">有</el-radio>
						<el-radio :label="false">无</el-radio>
					</el-radio-group>，
					<br>校准因子<i>$N_k$</i>：<span class="result">{{ form1.calibrationFactor }}</span>；
					靶/滤过：
						<el-select
							v-model="form1.target"
							size="mini"
							placeholder=""
							style="width: 60px"
							class="splitselect"
							clearable>
							<el-option
								v-for="item in dict.type.target_type"
								:key="item.value"
								:label="item.label"
								:value="item.value">
							</el-option>
						</el-select> /
						<el-select
							v-model="form1.filtration"
							size="mini"
							placeholder=""
							style="width: 60px"
							class="splitselect"
							clearable>
							<el-option
								v-for="item in dict.type.filtration_type"
								:key="item.value"
								:label="item.label"
								:value="item.value">
							</el-option>
						</el-select>
				</div>

				<table border="1" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td width="20%" colspan="2">预置条件(mAs)</td>
						<td>
							<el-input v-model="form1.milliampereSecond_1"/>
						</td>
						<td>
							<el-input v-model="form1.milliampereSecond_2"/>
						</td>
						<td>
							<el-input v-model="form1.milliampereSecond_3"/>
						</td>
						<td>
							<el-input v-model="form1.milliampereSecond_4"/>
						</td>
						<td>
							<el-input v-model="form1.milliampereSecond_5"/>
						</td>
						<td>
							<el-input v-model="form1.milliampereSecond_6"/>
						</td>
						<td>
							线性相关系数<i>$R ^2 $</i>
						</td>
					</tr>

					<tr>
						<td rowspan="2">入射剂量<br>μGy</td>
						<td>读取值</td>
						<td>
							<el-input v-model="form1.measurementValue_1"/>
						</td>
						<td>
							<el-input v-model="form1.measurementValue_2"/>
						</td>
						<td>
							<el-input v-model="form1.measurementValue_3"/>
						</td>
						<td>
							<el-input v-model="form1.measurementValue_4"/>
						</td>
						<td>
							<el-input v-model="form1.measurementValue_5"/>
						</td>
						<td>
							<el-input v-model="form1.measurementValue_6"/>
						</td>
						<td rowspan="3" class="result">
							<span>{{form1.fittingRelevantParameters}}</span>
						</td>
					</tr>
					<tr>
						<td>校准值</td>
						<td class="result">
							<span>{{form1.calibrationValue_1}}</span>
						</td>
						<td class="result">
							<span>{{form1.calibrationValue_2}}</span>
						</td>
						<td class="result">
							<span>{{form1.calibrationValue_3}}</span>
						</td>
						<td class="result">
							<span>{{form1.calibrationValue_4}}</span>
						</td>
						<td class="result">
							<span>{{form1.calibrationValue_5}}</span>
						</td>
						<td class="result">
							<span>{{form1.calibrationValue_6}}</span>
						</td>
					</tr>
					<tr>
						<td colspan="2">平均像素值</td>
						<td>
							<el-input v-model="form1.averageValue_1"/>
						</td>
						<td>
							<el-input v-model="form1.averageValue_2"/>
						</td>
						<td>
							<el-input v-model="form1.averageValue_3"/>
						</td>
						<td>
							<el-input v-model="form1.averageValue_4"/>
						</td>
						<td>
							<el-input v-model="form1.averageValue_5"/>
						</td>
						<td>
							<el-input v-model="form1.averageValue_6"/>
						</td>
					</tr>
				</table>
				<br>
			</div> -->

      <!-- 2.影像接收器均匀性和伪影------------------------------------------------------------------------ -->
      <!-- <div id="table2">
        <div class="innertitle">
          2.影像接收器均匀性和伪影
        </div>
        （ <el-checkbox @change="changeNotHave($event, 2)" v-model="form2.notHave">设备不具备预处理影像程序</el-checkbox> ）
        <div class="tip-30">
          焦点状态：
          <el-radio-group v-model="form2.focusType">
            <el-radio :label="1">大焦点</el-radio>
            <el-radio :label="2">小焦点</el-radio>
          </el-radio-group>；
          滤线栅：
          <el-radio-group v-model="form2.filterGrid">
            <el-radio :label="true">有</el-radio>
            <el-radio :label="false">无</el-radio>
          </el-radio-group>；
          压迫器：
          <el-radio-group v-model="form2.compressor">
            <el-radio :label="true">有</el-radio>
            <el-radio :label="false">无</el-radio>
          </el-radio-group>；
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td rowspan="2" width="5%">电压</td>
            <td colspan="2">临床常用</td>
            <td rowspan="2">曝光方式</td>
            <td width="15%">STP公式</td>
            <td rowspan="2">中心</td>
            <td rowspan="2">左上</td>
            <td rowspan="2">右上</td>
            <td rowspan="2">左下</td>
            <td rowspan="2">右下</td>
            <td rowspan="3">最大偏差<br>De（%）</td>
          </tr>

          <tr>
            <td>mAs</td>
            <td>靶/滤过</td>
            <td>
              <el-input v-model="form2.formula" />
            </td>
          </tr>

          <tr>
            <td rowspan="2">
              28kV
            </td>
            <td rowspan="2">
              <el-input v-model="form2.milliampereSecond" />
            </td>
            <td rowspan="2" width="12%">
              <el-select v-model="form2.target" size="mini" placeholder="" class="splitselect" clearable>
                <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select> /
              <el-select v-model="form2.filtration" size="mini" placeholder="" class="splitselect" clearable>
                <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </td>
            <td rowspan="2">
              <el-radio-group v-model="form2.exposureType">
                <el-radio :label="1" style="margin-bottom: 5px">手动</el-radio>
                <el-radio :label="2">自动</el-radio>
              </el-radio-group>
            </td>
            <td>
              ROI像素值
            </td>
            <td>
              <el-input v-model="form2.pixelValue_1" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_2" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_3" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_4" />
            </td>
            <td>
              <el-input v-model="form2.pixelValue_5" />
            </td>
          </tr>

          <tr>
            <td>
              剂量值m（mGy）
            </td>
            <td class="result">
              <span>{{form2.doseValue_1}}</span>
            </td>
            <td class="result">
              <span>{{form2.doseValue_2}}</span>
            </td>
            <td class="result">
              <span>{{form2.doseValue_3}}</span>
            </td>
            <td class="result">
              <span>{{form2.doseValue_4}}</span>
            </td>
            <td class="result">
              <span>{{form2.doseValue_5}}</span>
            </td>
            <td class="result">
              <span>{{form2.maxDeviation}}</span>
            </td>
          </tr>
        </table>

        <div class="tip-30">
          调节窗宽窗位使图像显示至观察者认为最清晰的状态，观察图像上：
          <br>非均匀区：
          <el-radio-group v-model="form2.nonUniformZone">
            <el-radio :label="true">有</el-radio>
            <el-radio :label="false">无</el-radio>
          </el-radio-group>，
          模糊区：
          <el-radio-group v-model="form2.fuzzyZone">
            <el-radio :label="true">有</el-radio>
            <el-radio :label="false">无</el-radio>
          </el-radio-group>，
          其他异常影像：
          <el-radio-group v-model="form2.exceptional">
            <el-radio :label="true">有</el-radio>
            <el-radio :label="false">无</el-radio>
          </el-radio-group>，
          <br>可疑伪影随图像移动：
          <el-radio-group v-model="form2.move">
            <el-radio :label="true">是</el-radio>
            <el-radio :label="false">否</el-radio>
          </el-radio-group>，
          伪影性质：
          <el-radio-group v-model="form2.artifactProperty">
            <el-radio :label="1">影像接收器伪影</el-radio>
            <el-radio :label="2">显示器系统伪影</el-radio>
          </el-radio-group>，
          <br>
          <i>$D_e = \frac {m_{中心} - m_角}{m_{中心} } \times 100\%$</i>
        </div>
        <br>
      </div> -->

      <!-- 3.高对比度分辨力------------------------------------------------------------------------ -->
      <!-- <div id="table3">
        <div class="innertitle">
          3.高对比度分辨力
        </div>

        <div class="tip-30">
          预置条件：<el-input v-model="form3.tubeVoltage" class="input-line" />kV，<el-input v-model="form3.tubeCurrent" class="input-line" />mAs，
          靶/滤过：
          <el-select v-model="form3.target" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select> /
          <el-select v-model="form3.filtration" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td width="15%">分辨力卡方向</td>
            <td width="15%">厂家规定值<br>（lp/mm）</td>
            <td width="15%"><i>$f_Nyquist$</i><br>（lp/mm）</td>
            <td width="15%">基线值（lp/mm）</td>
            <td width="15%">高对比度分辨力，<br>（lp/mm）</td>
            <td width="15%">计算结果（%）</td>
          </tr>

          <tr>
            <td>水平</td>
            <td>
              <el-input v-model="form3.manufacturerGuaranteeValueLevel" />
            </td>
            <td>
              <el-input v-model="form3.fnyquistLevel" />
            </td>
            <td>
              <el-input v-model="form3.baselineValueLevel" />
            </td>
            <td>
              <el-input v-model="form3.contrastResolutionHighLevel" />
            </td>
            <td class="result">
              <span>{{form3.calcResultLevel}}</span>
            </td>
          </tr>
          <tr>
            <td>垂直</td>
            <td>
              <el-input v-model="form3.manufacturerGuaranteeValueVertical" />
            </td>
            <td>
              <el-input v-model="form3.fnyquistVertical" />
            </td>
            <td>
              <el-input v-model="form3.baselineValueVertical" />
            </td>
            <td>
              <el-input v-model="form3.contrastResolutionHighVertical" />
            </td>
            <td class="result">
              <span>{{form3.calcResultVertical}}</span>
            </td>
          </tr>
        </table>

        <div class="tip-50">
          计算结果% = 测量值/基线值或规定值 × 100%
        </div>
      </div> -->

      <!-- 4.低对比度细节------------------------------------------------------------------ -->
      <!-- <div id="table4">
        <div class="innertitle">
          4.低对比度细节
        </div>

        <div class="tip-30">
          预置条件（<el-radio-group v-model="form4.presetConditions" class="split-radio">
            <el-radio :label="1" style="margin-right: 10px">手动</el-radio>
            <el-radio :label="2">自动</el-radio>
          </el-radio-group>）：
          <el-input v-model="form4.tubeVoltage" class="input-line" />kV，
          <el-input v-model="form4.tubeCurrent" class="input-line" />mAs，
          靶/滤过：
          <el-select v-model="form4.target" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.target_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select> /
          <el-select v-model="form4.filtration" size="mini" placeholder="" style="width: 60px" class="splitselect" clearable>
            <el-option v-for="item in dict.type.filtration_type" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td width="20%">细节直径D,（mm）</td>
            <td>
              <el-input v-model="form4.diameter_1" />
            </td>
            <td>
              <el-input v-model="form4.diameter_2" />
            </td>
            <td>
              <el-input v-model="form4.diameter_3" />
            </td>
            <td>
              <el-input v-model="form4.diameter_4" />
            </td>
            <td>
              <el-input v-model="form4.diameter_5" />
            </td>
          </tr>
          <tr>
            <td>细节厚度,（μm）</td>
            <td>
              <el-input v-model="form4.thickness_1" />
            </td>
            <td>
              <el-input v-model="form4.thickness_2" />
            </td>
            <td>
              <el-input v-model="form4.thickness_3" />
            </td>
            <td>
              <el-input v-model="form4.thickness_4" />
            </td>
            <td>
              <el-input v-model="form4.thickness_5" />
            </td>
          </tr>
          <tr>
            <td>Cr,（%）</td>
            <td>
              <el-input v-model="form4.contrast_1" />
            </td>
            <td>
              <el-input v-model="form4.contrast_2" />
            </td>
            <td>
              <el-input v-model="form4.contrast_3" />
            </td>
            <td>
              <el-input v-model="form4.contrast_4" />
            </td>
            <td>
              <el-input v-model="form4.contrast_5" />
            </td>
          </tr>
        </table>

        <div class="tip-30">
          CDMAM模体低对比度
        </div>

        <table border="1" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td>细节厚度，μm</td>
            <td>
              0.03
            </td>
            <td>
              0.04
            </td>
            <td>
              0.05
            </td>
            <td>
              0.06
            </td>
            <td>
              0.08
            </td>
            <td>
              0.10
            </td>
            <td>
              0.13
            </td>
            <td>
              0.16
            </td>
          </tr>
          <tr>
            <td>Cr，%</td>
            <td>
              0.52
            </td>
            <td>
              0.70
            </td>
            <td>
              0.87
            </td>
            <td>
              1.04
            </td>
            <td>
              1.39
            </td>
            <td>
              1.73
            </td>
            <td>
              2.25
            </td>
            <td>
              2.76
            </td>
          </tr>
          <tr>
            <td>细节厚度，μm</td>
            <td>
              0.20
            </td>
            <td>
              0.25
            </td>
            <td>
              0.36
            </td>
            <td>
              0.50
            </td>
            <td>
              0.71
            </td>
            <td>
              1.00
            </td>
            <td>
              1.42
            </td>
            <td>
              2.00
            </td>
          </tr>
          <tr>
            <td>Cr，%</td>
            <td>
              3.44
            </td>
            <td>
              4.28
            </td>
            <td>
              6.11
            </td>
            <td>
              8.38
            </td>
            <td>
              11.68
            </td>
            <td>
              16.05
            </td>
            <td>
              22.00
            </td>
            <td>
              29.53
            </td>
          </tr>
        </table>
        <br>
      </div> -->
    </div>

    <!-- 细节厚度弹框 -->
    <DetailThicknessCardDialog
      :show.sync="showDetailThicknessCardDialog"
    ></DetailThicknessCardDialog>

    <!-- Cr,%弹框 -->
    <CrContrastCardDialog
      :show.sync="showCrContrastCardDialog"
    ></CrContrastCardDialog>
  </div>
</template>

<script>
import {
  getInfoById, receiverResponse, artifact,
  resolutionHigh, resolutionLow, getBaselineValueDetail
} from "@/api/testItem/item11";
import DetailThicknessCardDialog from '@/views/slide/component/DetailThicknessCardDialog.vue'
import CrContrastCardDialog from '@/views/slide/component/CrContrastCardDialog.vue'

export default {
  name: "testItem11",
  components: {
    DetailThicknessCardDialog,
    CrContrastCardDialog,
  },
  dicts: ['target_type', 'filtration_type'],
  data() {
    return {
      form: {

      },
      form1: {

      },
      form2: {

      },
      form3: {

      },
      form4: {

      },
      itemsId: null,

			dialogVisibleBaselineValue: false,
      form3Detail: {},

      // 细节厚度弹框
      showDetailThicknessCardDialog: false,
      // Cr,%弹框
      showCrContrastCardDialog: false
    };
  },
  props: {
    // 基本信息数据
    basicForm: {
      type: Object,
      default: () => {
        return {}
      },
    },
  },
  created() {
    this.$nextTick(() => {
      // 获取详情
      getInfoById(this.basicForm.resultId).then(response => {
        this.itemsId = response.data?.itemsId;
        // 1.影像接收器响应
        this.form1 = response.data?.receiverResponse || {};
        // 2.影像接收器均匀性和伪影
        this.form2 = response.data?.uniformityArtifact || {};
        // 3.高对比度分辨力
        this.form3 = response.data?.contrastResolutionHigh || {};
        // 4.低对比度细节
        this.form4 = response.data?.contrastResolutionLow || {};
        // this.form4.diameter_5 = (this.form4.diameter_5 || this.form4.diameter_5 === 0) ? this.form4.diameter_5 : '2.0';
      }).catch((response) => {
        this.$emit("loadingchange", true);
      });
      let _this = this;
      // 绑定请求---表格
      let itemsLength = 4;
      for (let index = 0; index < itemsLength; index++) {
        let tableInputs = document.getElementById(`table${index + 1}`).getElementsByTagName("input");
        for (let i = 0; i < tableInputs.length; i++) {
          this.bind(tableInputs[i], () => {
            this.submitTestForm(index + 1)
          })
          // let elSelect = this.elHaveComponent(tableInputs[i]) // 获取Component
          // elSelect.$on('change', function(){
          // 	try {
          // 		this.validate(tableInputs[i])
          // 	} catch (error) {
          // 		console.log(error)
          // 	}
          // 	_this.submitTestForm(index + 1);
          // })
        }
      }
    })
  },
  methods: {
    // 提交检测项信息
    submitTestForm(index) {
      this.$emit("loadingchange", true);
      this[`form${index}`].itemsId = this.itemsId;
      switch (index) {
        // 1.影像接收器响应
        case 1:
          receiverResponse(this.form1).then((response) => {
            response.data ? this.form1 = response.data : "";
            this.resetInfo()
            this.$emit("loadingchange", false);
          })
          break;
        // 2.影像接收器均匀性和伪影
        case 2:
          artifact(this.form2).then((response) => {
            response.data ? this.form2 = response.data : "";
            this.resetInfo()
            this.$emit("loadingchange", false);
          })
          break;
        case 3:
          // 3.高对比度分辨力
          resolutionHigh(this.form3).then((response) => {
            response.data ? this.form3 = response.data : "";
            this.resetInfo()
            this.$emit("loadingchange", false);
          })
          break;
        case 4:
          // 4.低对比度细节
          resolutionLow(this.form4).then((response) => {
            response.data ? this.form4 = response.data : "";
            this.resetInfo()
            this.$emit("loadingchange", false);
          })
          break;
      }
    },
    resetInfo() {
      // 获取详情
      getInfoById(this.basicForm.resultId).then(response => {
        this.itemsId = response.data?.itemsId;
        // 1.影像接收器响应
        this.form1 = response.data?.receiverResponse || {};
        // 2.影像接收器均匀性和伪影
        this.form2 = response.data?.uniformityArtifact || {};
        // 3.高对比度分辨力
        this.form3 = response.data?.contrastResolutionHigh || {};
        // 4.低对比度细节
        this.form4 = response.data?.contrastResolutionLow || {};
        // this.form4.diameter_5 = (this.form4.diameter_5 || this.form4.diameter_5 === 0) ? this.form4.diameter_5 : '2.0';
      }).catch((response) => {
        this.$emit("loadingchange", true);
      });
    },
    // 更改无此设备
    changeNotHave(val, index) {
      let list = [1, 2];
      list.forEach(item => {
        if (item != index) {
          this.$set(this[`form${item}`], "notHave", val);
          this.submitTestForm(item);
        }
      });
    },
    // 点击 4.高对比度分辨力 基线值
		handleClickBaselineValue(value) {
			if (this.form3.baseLineControls) return
			if (!value && value !== 0) return
			this.dialogVisibleBaselineValue = true
			getBaselineValueDetail(this.itemsId).then((response) => {
				this.form3Detail = response.data || {}
				this.$nextTick(() => {
					window.MathJax.Hub.Typeset();
				})
			}).catch((err) => {})
		},
  },
};
</script>

<style lang="scss" scoped>
@import "../content.scss";
</style>
